<!--回复正文-->
<script setup>
import {toRefs} from "vue";
import ContentRender from "@/components/content/ContentRender.vue";

const props = defineProps({
  data: {type: Object},
})

const {data} = toRefs(props)
</script>

<template>
  <div v-if="data">
    <h3 v-if="data.title">
      <span v-if="data.replyId!==undefined">{{ data.title }}</span>
      <span v-else style="color:red">{{ data.title }}</span>
    </h3>

    <content-render :data="data.contentNodes"/>
    <!--<div v-for="line in data.content.split('<br>').flatMap(i=>i.split('<br/>'))" v-if="data.content">-->
    <!--{{ line }}-->
    <!--</div>-->
  </div>
</template>

<style scoped>
h3 {
  margin-top: 5px;
  margin-bottom: 5px;
}
</style>